<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ListAtividadeTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
        <h:form styleClass="jsfcrud_list_form">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:outputText escape="false" value="#{bundle.ListAtividadeEmpty}" rendered="#{atividadeController.items.rowCount == 0}"/>
            <h:panelGroup rendered="#{atividadeController.items.rowCount > 0}">
                <h:outputText value="#{atividadeController.pagination.pageFirstItem + 1}..#{atividadeController.pagination.pageLastItem + 1}/#{atividadeController.pagination.itemsCount}"/>&nbsp;
                <h:commandLink action="#{atividadeController.previous}" value="#{bundle.Previous} #{atividadeController.pagination.pageSize}" rendered="#{atividadeController.pagination.hasPreviousPage}"/>&nbsp;
                <h:commandLink action="#{atividadeController.next}" value="#{bundle.Next} #{atividadeController.pagination.pageSize}" rendered="#{atividadeController.pagination.hasNextPage}"/>&nbsp;
                <h:dataTable value="#{atividadeController.items}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{bundle.ListAtividadeTitle_idAtividade}"/>
                        </f:facet>
                        <h:outputText value="#{item.idAtividade}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{bundle.ListAtividadeTitle_nome}"/>
                        </f:facet>
                        <h:outputText value="#{item.nome}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{bundle.ListAtividadeTitle_descricao}"/>
                        </f:facet>
                        <h:outputText value="#{item.descricao}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{bundle.ListAtividadeTitle_dataInicio}"/>
                        </f:facet>
                        <h:outputText value="#{item.dataInicio}">
                            <f:convertDateTime pattern="MM/dd/yyyy" />
                        </h:outputText>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{bundle.ListAtividadeTitle_dataFinal}"/>
                        </f:facet>
                        <h:outputText value="#{item.dataFinal}">
                            <f:convertDateTime pattern="MM/dd/yyyy" />
                        </h:outputText>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{bundle.ListAtividadeTitle_projeto}"/>
                        </f:facet>
                        <h:outputText value="#{item.projeto}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="&nbsp;"/>
                        </f:facet>
                        <h:commandLink action="#{atividadeController.prepareView}" value="#{bundle.ListAtividadeViewLink}"/>
                        <h:outputText value=" "/>
                        <h:commandLink action="#{atividadeController.prepareEdit}" value="#{bundle.ListAtividadeEditLink}"/>
                        <h:outputText value=" "/>
                        <h:commandLink action="#{atividadeController.destroy}" value="#{bundle.ListAtividadeDestroyLink}"/>
                    </h:column>
                </h:dataTable>
            </h:panelGroup>
            <br />
            <h:commandLink action="#{atividadeController.prepareCreate}" value="#{bundle.ListAtividadeCreateLink}"/>
            <br />
            <br />
            <h:commandLink value="#{bundle.ListAtividadeIndexLink}" action="/index" immediate="true" />
        </h:form>
        </ui:define>
    </ui:composition>

</html>
